﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Demos.DesignPatterns._10_装饰器模式
{

    /// <summary>
    /// 装饰器基类
    /// </summary>
    public abstract class CoffeeDecorator:ICoffee
    {
        protected readonly ICoffee _coffee;

        protected CoffeeDecorator(ICoffee coffee)
        {
            _coffee = coffee;
        }

        public virtual string GetDescription() => _coffee.GetDescription();
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public virtual decimal GetCost() => _coffee.GetCost();    

    }
}
